package com.yuntsg.ruiijn.paperana.utils;

import cn.hutool.db.Db;
import cn.hutool.db.Entity;
import lombok.SneakyThrows;

/**
 * @Author: gcr
 * @Date: 2023/9/6 14:52
 */
public class DbSearchUtil {


    @SneakyThrows
    public static Entity backEntity(Db use, String table, Integer id) {
        Entity entity = use.queryOne("select file_id from " + table + " where id = ?", id);
        if (entity != null) {
            return entity;
        } else {
            return null;
        }
    }
}
